package com.chen.object;

public class PhoneTest {
    public static void main(String[] args) {
        // 创建对象
        Phone phone1 = new Phone();

        // 给手机赋值
        phone1.brand = "华为";
        phone1.price = 5999;

        // 获取手机对象中的属性值
        System.out.println(phone1.brand);
        System.out.println(phone1.price);

        // 调用手机中的方法
        phone1.call();
        phone1.playGame();

        Phone phone2 = new Phone();
        phone2.brand = "苹果";
        phone2.price = 9999;
        System.out.println(phone2.brand);
        System.out.println(phone2.price);
        phone2.call();
        phone2.playGame();





















    }
}
